﻿using Hetang.Models.DataContext;
using Hetang.Models.Helper;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace Hetang.Areas.User.Models.Helper
{
    public class CompanyHelper
    {
        /// <summary>
        /// 创建一个企业简介
        /// </summary>
        /// <param name="company"></param>
        /// <returns></returns>
        public static bool CreateCompany(tbl_Company company)
        {
            try
            {
                using (HetangDataContext db = new HetangDataContext(DatabaseHelper.GetDatabaseConnect))
                {
                    db.tbl_Company.InsertOnSubmit(company);
                    db.SubmitChanges();
                    return true;
                }
            }
            catch
            {
                return false;
            }
        }
    }
}